using System.Linq;
using System.Runtime.InteropServices;

namespace EOSDigital.SDK
{
	public struct UsersetData
	{
		public int Valid;

		public int DataSize;

		[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
		public string Caption;

		[MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)]
		public byte[] Data;

		public static bool operator ==(UsersetData x, UsersetData y)
		{
			if (x.Valid == y.Valid && x.DataSize == y.DataSize && x.Caption == y.Caption)
			{
				return x.Data.SequenceEqual(y.Data);
			}
			return false;
		}

		public static bool operator !=(UsersetData x, UsersetData y)
		{
			return !(x == y);
		}

		public override bool Equals(object obj)
		{
			if (obj is UsersetData)
			{
				return this == (UsersetData)obj;
			}
			return false;
		}

		public override int GetHashCode()
		{
			int num = -2128831035;
			num *= (0x1000193 ^ this.Valid.GetHashCode());
			num *= (0x1000193 ^ this.DataSize.GetHashCode());
			num *= (0x1000193 ^ this.Caption.GetHashCode());
			return num * (0x1000193 ^ this.Data.GetHashCode());
		}
	}
}
